package com.iflytek.cosmo.ocr.common.core.station;

import com.iflytek.cosmo.ocr.common.config.WorksProperties;
import com.iflytek.cosmo.ocr.common.core.task.RecognizedTask;
import com.iflytek.cosmo.ocr.common.core.worker.FormatWorker;

/**
 * 格式化工作台
 */
public class FormatStation extends AbstractStation {

    public FormatStation(WorksProperties worksProperties) {
        super(worksProperties.getFormatWorker(), worksProperties.getQueueSizeWorker(), "Format-Worder");
    }

    /**
     * 设置下一个工作台
     *
     * @param station
     */
    @Override
    public void setNextStation(AbstractStation station) {
        //下一个工作台
        nextStation = station;
    }

    @Override
    public Runnable createWorker(RecognizedTask task) {
        return new FormatWorker(task, nextStation);
    }
}
